package dao;

import java.util.List;

import org.hibernate.Session;

import modele.Client;


import persistence.BaseDAO;

public class ClientDAO{
	
	public static void ajouterClient(Client client, Session session) throws Exception{
		BaseDAO.getInstance().ajouter(client,session);
	}

	public static void modifierClient(Client client, Session session) {
		BaseDAO.getInstance().modifier(client,session);
	}

	public static void SupprimerClient(Client client, Session session) {
		BaseDAO.getInstance().delete(client,session);
	}

	public static Client getClient(int id, Session session) {
		return (Client) BaseDAO.getInstance().getObject(Client.class, id,session);
	}

	public static List getListClients(String requette, Session session) {
		return BaseDAO.getInstance().getListObject(requette,session);
	}
	public static List getListClients(String requette, Session session,int firstResult,int maxResults) {
		return BaseDAO.getInstance().getLimitedListObject(requette,firstResult,maxResults,session);
	}
}
